<div class="box-slider">
    <?php get_template_part('block', 'slider');?>
    <div class="over"></div>
</div><!--//box-slider-->

<header class="header">
    <div class="fix">
        <?php get_template_part('block', 'headerall');?>
        <div class="header-bot animated-area">
            <h2 class="title"><?php the_title(); ?></h2>
            <ul class="nav-service">
                <?php
                $postid = get_the_ID();
                $post_parent_id = wp_get_post_parent_id($postid); //id khóa học cha
                if($post_parent_id == 0) $post_parent_id = $postid;
                $posts_array = get_posts( array('post_type'=>'page', 'post_parent'=>$post_parent_id) ); if(!is_array($posts_array)) $posts_array = array();
                $idx = 1;
                $s = 0.6;
                $tab_details = is_array(get_field('tab_details', $postid)) ? get_field('tab_details', $postid) : array();
                $tab_customer = is_array(get_field('tab_customer', $post_parent_id)) ? get_field('tab_customer', $post_parent_id) : array();
                foreach ( $posts_array as $post ):
                    ?>
                    <li class="animated" data-animation="bounce-in" data-animation-delay="<?=$s?>s">
                        <a href="<?php echo get_permalink($post->ID);?>" title="<?php echo $post->post_title; ?>">
                            <span class="number"><?=$idx?></span>
                            <span class="text"><?php echo $post->post_title; ?></span>
                            <span class="arrow"></span>
                        </a>
                    </li>
                    <?php $idx++;$s+=0.3; endforeach;  wp_reset_postdata(); ?>
            </ul>
        </div>
    </div>
</header><!--//header-->